package com.lebang.medicalInquiry.mapper;

import com.lebang.medicalInquiry.model.po.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Integer id);


    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    List<Article> getArticleByCondition(@Param("classifyId") Integer classifyId, @Param("keyWord") String keyWord, @Param("page") int page, @Param("limit") Integer limit);

    List<Article> listByCondition(@Param("keyWord") String keyWord, @Param("classifyId") Integer classifyId, @Param("state") Integer state, @Param("page") int page, @Param("limit") Integer limit);

    Integer countByCondition(@Param("keyWord") String keyWord, @Param("classifyId") Integer classifyId, @Param("state") Integer state);

}